package com.sright.bcard.content.dal.mapper;

import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.entity.CardDO;
import com.sright.bcard.content.dal.query.CardListParamQuery;
import com.sright.bcard.content.dal.result.CardListDTO;
import com.sright.bcard.content.dal.result.CardListResult;
import com.sright.bcard.content.dal.result.EnterpriseCardResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CardDOMapper extends BaseMapper<CardDO> {

    Integer deleteById(Long id);

    List<CardListResult> cardList(CardListParamQuery cardListParamQuery);

    Integer count(CardListParamQuery cardListParamQuery);

    CardDO selectByUserId(Long personalUserId);

    List<CardListDTO> selectIdListByUserId(Long userId);

    List<CardListDTO> selectIdListByEnterpriseId(Long enterpriseId);

    Integer enterpriseCardCount(@Param("title") String title, @Param("enterpriseId") Long enterpriseId);

    List<EnterpriseCardResult> queryEnterpriseCard(@Param("title") String title, @Param("offset") Integer offset, @Param("limit") Integer limit, @Param("enterpriseId") Long enterpriseId);

    List<CardDO> selectByCardBaseInfoIds(@Param("cardBaseInfoIds") List<Long> cardBaseInfoIds);
}